import Vue from 'vue'
import ElementUI from 'element-ui'

let loading = null;

Vue.prototype.$loadingShow = () => {
    loading = ElementUI.Loading.service({
        lock: true,
        text: '拼命加载中，请稍等',
        background: 'rgba(0, 0, 0, 0.7)'
    });
}

Vue.prototype.$loadingHide = () => {
    if (loading != null) {
        loading.close();
    }
}